<!DOCTYPE html>
<html>
<head>
    <title>体温</title>
    <#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
<!--    根据时间，判断表单是上午还是下午-->
    <div class="alert alert-primary" style="background-color: #d9ecdb" v-if="!headMsg">
        <p v-if="new Date().getHours()>= 6 && new Date().getHours() < 11">当前是上午的体温表单</p>
        <p v-else-if="new Date().getHours()>= 11 && new Date().getHours() < 21">当前是下午的体温表单</p>
        <p v-else>当前不可填写体温</p>
    </div>
    <div class="clearfix"></div>

    <!--    根据时间，判断当前能否填写体温-->

    <div v-show="showList" v-if="new Date().getHours()>= 6 && new Date().getHours() <= 21">

        <div class="grid-btn" >
            <#if shiro.hasPermission("sys:temperature:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;申报体温</a>
        </#if>
<!--        <#if shiro.hasPermission("sys:temperature:update")>-->
<!--        <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>-->
<!--    </#if>-->
<!--    <#if shiro.hasPermission("sys:temperature:delete")>-->
<!--    <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>-->
<!--</#if>-->
</div>
<table id="jqGrid"></table>
<div id="jqGridPager"></div>
</div>

<div v-show="!showList" class="panel panel-default">
    <div class="panel-heading">{{title}}</div>
    <form class="form-horizontal">
        <div class="form-group">
            <div class="col-sm-2 control-label">姓名</div>
            <div class="col-sm-10">
                <input type="text" class="form-control"  :placeholder="user.username" readonly/>
            </div>
        </div>

<!--        <div class="form-group">-->
<!--            <div class="col-sm-2 control-label">姓名</div>-->
<!--            <div class="col-sm-10">-->
<!--                <input type="text" class="form-control" v-model="temperature.userId" placeholder="用户名" readonly/>-->
<!--            </div>-->
<!--        </div>-->
        <div class="form-group">
            <div class="col-sm-2 control-label">体温</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="temperature.temperature" placeholder="体温，单位：℃"/>
            </div>
        </div>
<!--        <div class="form-group">-->
<!--            <div class="col-sm-2 control-label">填写时间</div>-->
<!--            <div class="col-sm-10">-->
<!--                <input type="text" class="form-control" v-model="temperature.createTime" placeholder="填写时间"/>-->
<!--            </div>-->
<!--        </div>-->
        <div class="form-group">
            <div class="col-sm-2 control-label"></div>
            <input type="button" class="btn btn-primary" id="btnSaveOrUpdate" data-loading-text="保存中..."
                   @click="saveOrUpdate" value="确定"/>
            &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
        </div>
    </form>
</div>
</div>

<script src="${request.contextPath}/statics/js/modules/sys/temperature.js?_${.now?long}"></script>
</body>
</html>